package com.kede.app.domain;

import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.math.BigDecimal;
import java.io.Serializable;

/**
* @description /
* @author Pr.li
* @date 2023-11-04
**/
@Entity
@Data
@Table(name="t_zhi_good_valid")
public class ZhiGoodValid implements Serializable {
    /**
    * 
    */
    @ApiModelProperty(value = "id")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`id`")
    private Integer id;
    /**
    * 店铺名称
    */
    @ApiModelProperty(value = "店铺名称")
    @Column(name = "`name`")
    private String name;
    /**
    * 通过数量
    */
    @ApiModelProperty(value = "通过数量")
    @Column(name = "`pass`")
    private Integer pass;
    /**
    * 失败数量
    */
    @ApiModelProperty(value = "失败数量")
    @Column(name = "`fail`")
    private Integer fail;
    /**
    * 验收数量
    */
    @ApiModelProperty(value = "验收数量")
    @Column(name = "`num`")
    private Integer num;
    /**
    * 门店id
    */
    @ApiModelProperty(value = "门店id")
    @Column(name = "`store_id`")
    private Integer storeId;
    /**
    * 应收金额
    */
    @ApiModelProperty(value = "应收金额")
    @Column(name = "`should_money`")
    private BigDecimal shouldMoney;
    /**
    * 
    */
    @ApiModelProperty(value = "createTime")
    @Column(name = "`create_time`")
    private Timestamp createTime;
    /**
    * 区代id
    */
    @ApiModelProperty(value = "区代id")
    @Column(name = "`qu_id`")
    private Integer quId;
    /**
    * 市代id
    */
    @ApiModelProperty(value = "市代id")
    @Column(name = "`shi_id`")
    private Integer shiId;
    /**
    * 运输单id
    */
    @ApiModelProperty(value = "运输单id")
    @Column(name = "`transport_id`")
    private Integer transportId;
    /**
    * 实收金额
    */
    @ApiModelProperty(value = "实收金额")
    @Column(name = "`real_money`")
    private BigDecimal realMoney;

    public void copy(ZhiGoodValid source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
